.class public Lcom/melesta/payment/tapjoy/TapjoySystem;
.super Ljava/lang/Object;
.source "TapjoySystem.java"

# interfaces
.implements Lcom/melesta/payment/interfaces/ISystem;


# static fields
.field static final SYSTEM_NAME:Ljava/lang/String; = "tapjoy"


# instance fields
.field private appid:Ljava/lang/String;

.field private defaultListener:Lcom/melesta/payment/interfaces/IListener;

.field private handler:Landroid/os/Handler;

.field private secret:Ljava/lang/String;


# direct methods
.method public constructor <init>()V
    .locals 0

    .prologue
    .line 18
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method static synthetic access$000(Lcom/melesta/payment/tapjoy/TapjoySystem;)Lcom/melesta/payment/interfaces/IListener;
    .locals 1
    .parameter "x0"

    .prologue
    .line 18
    iget-object v0, p0, Lcom/melesta/payment/tapjoy/TapjoySystem;->defaultListener:Lcom/melesta/payment/interfaces/IListener;

    return-object v0
.end method


# virtual methods
.method public get(Ljava/lang/String;)Ljava/lang/Object;
    .locals 1
    .parameter "property"

    .prologue
    .line 159
    const-string v0, "appid"

    invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 160
    iget-object v0, p0, Lcom/melesta/payment/tapjoy/TapjoySystem;->appid:Ljava/lang/String;

    .line 164
    :goto_0
    return-object v0

    .line 161
    :cond_0
    const-string v0, "secret"

    invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_1

    .line 162
    iget-object v0, p0, Lcom/melesta/payment/tapjoy/TapjoySystem;->secret:Ljava/lang/String;

    goto :goto_0

    .line 164
    :cond_1
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public getDefaultListener()Lcom/melesta/payment/interfaces/IListener;
    .locals 1

    .prologue
    .line 168
    iget-object v0, p0, Lcom/melesta/payment/tapjoy/TapjoySystem;->defaultListener:Lcom/melesta/payment/interfaces/IListener;

    return-object v0
.end method

.method public getName()Ljava/lang/String;
    .locals 1

    .prologue
    .line 114
    const-string v0, "tapjoy"

    return-object v0
.end method

.method public getPoints(Z)V
    .locals 2
    .parameter "ignoreErrors"

    .prologue
    .line 73
    invoke-static {}, Lcom/tapjoy/TapjoyConnect;->getTapjoyConnectInstance()Lcom/tapjoy/TapjoyConnect;

    move-result-object v0

    new-instance v1, Lcom/melesta/payment/tapjoy/TapjoySystem$3;

    invoke-direct {v1, p0, p1}, Lcom/melesta/payment/tapjoy/TapjoySystem$3;-><init>(Lcom/melesta/payment/tapjoy/TapjoySystem;Z)V

    invoke-virtual {v0, v1}, Lcom/tapjoy/TapjoyConnect;->getTapPoints(Lcom/tapjoy/TapjoyNotifier;)V

    .line 101
    return-void
.end method

.method public getRequestBuilder()Lcom/melesta/payment/interfaces/IRequestBuilder;
    .locals 1

    .prologue
    .line 109
    new-instance v0, Lcom/melesta/payment/tapjoy/TapjoyRequestBuilder;

    invoke-direct {v0, p0}, Lcom/melesta/payment/tapjoy/TapjoyRequestBuilder;-><init>(Lcom/melesta/payment/tapjoy/TapjoySystem;)V

    return-object v0
.end method

.method public onActivityResult(Landroid/content/Context;IILandroid/content/Intent;)Z
    .locals 1
    .parameter "context"
    .parameter "requestCode"
    .parameter "resultCode"
    .parameter "data"

    .prologue
    .line 178
    const/4 v0, 0x0

    return v0
.end method

.method public onCreate(Landroid/content/Context;Landroid/os/Handler;)V
    .locals 3
    .parameter "context"
    .parameter "handler"

    .prologue
    .line 30
    iput-object p2, p0, Lcom/melesta/payment/tapjoy/TapjoySystem;->handler:Landroid/os/Handler;

    .line 31
    const/4 v0, 0x1

    invoke-static {v0}, Lcom/tapjoy/TapjoyLog;->enableLogging(Z)V

    .line 32
    invoke-virtual {p1}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;

    move-result-object v0

    iget-object v1, p0, Lcom/melesta/payment/tapjoy/TapjoySystem;->appid:Ljava/lang/String;

    iget-object v2, p0, Lcom/melesta/payment/tapjoy/TapjoySystem;->secret:Ljava/lang/String;

    invoke-static {v0, v1, v2}, Lcom/tapjoy/TapjoyConnect;->requestTapjoyConnect(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V

    .line 35
    invoke-static {}, Lcom/tapjoy/TapjoyConnect;->getTapjoyConnectInstance()Lcom/tapjoy/TapjoyConnect;

    move-result-object v0

    new-instance v1, Lcom/melesta/payment/tapjoy/TapjoySystem$1;

    invoke-direct {v1, p0}, Lcom/melesta/payment/tapjoy/TapjoySystem$1;-><init>(Lcom/melesta/payment/tapjoy/TapjoySystem;)V

    invoke-virtual {v0, v1}, Lcom/tapjoy/TapjoyConnect;->setEarnedPointsNotifier(Lcom/tapjoy/TapjoyEarnedPointsNotifier;)V

    .line 60
    return-void
.end method

.method public onDestroy(Landroid/content/Context;Landroid/os/Handler;)V
    .locals 0
    .parameter "context"
    .parameter "handler"

    .prologue
    .line 121
    return-void
.end method

.method public onPause(Landroid/content/Context;Landroid/os/Handler;)V
    .locals 0
    .parameter "context"
    .parameter "handler"

    .prologue
    .line 139
    return-void
.end method

.method public onResume(Landroid/content/Context;Landroid/os/Handler;)V
    .locals 0
    .parameter "context"
    .parameter "handler"

    .prologue
    .line 145
    return-void
.end method

.method public onStart(Landroid/content/Context;Landroid/os/Handler;)V
    .locals 0
    .parameter "context"
    .parameter "handler"

    .prologue
    .line 127
    return-void
.end method

.method public onStop(Landroid/content/Context;Landroid/os/Handler;)V
    .locals 0
    .parameter "context"
    .parameter "handler"

    .prologue
    .line 133
    return-void
.end method

.method public purchaseProcessed(Lcom/melesta/payment/PaymentTransaction;)V
    .locals 0
    .parameter "pt"

    .prologue
    .line 185
    return-void
.end method

.method public bridge synthetic set(Ljava/lang/String;Ljava/lang/Object;)Lcom/melesta/payment/interfaces/ISystem;
    .locals 1
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 18
    invoke-virtual {p0, p1, p2}, Lcom/melesta/payment/tapjoy/TapjoySystem;->set(Ljava/lang/String;Ljava/lang/Object;)Lcom/melesta/payment/tapjoy/TapjoySystem;

    move-result-object v0

    return-object v0
.end method

.method public set(Ljava/lang/String;Ljava/lang/Object;)Lcom/melesta/payment/tapjoy/TapjoySystem;
    .locals 1
    .parameter "property"
    .parameter "value"

    .prologue
    .line 149
    const-string v0, "appid"

    invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_1

    .line 150
    invoke-virtual {p2}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/melesta/payment/tapjoy/TapjoySystem;->appid:Ljava/lang/String;

    .line 154
    :cond_0
    :goto_0
    return-object p0

    .line 151
    :cond_1
    const-string v0, "secret"

    invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 152
    invoke-virtual {p2}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/melesta/payment/tapjoy/TapjoySystem;->secret:Ljava/lang/String;

    goto :goto_0
.end method

.method public setDefaultListener(Lcom/melesta/payment/interfaces/IListener;)Lcom/melesta/payment/tapjoy/TapjoySystem;
    .locals 0
    .parameter "defaultListener"

    .prologue
    .line 172
    iput-object p1, p0, Lcom/melesta/payment/tapjoy/TapjoySystem;->defaultListener:Lcom/melesta/payment/interfaces/IListener;

    .line 173
    return-object p0
.end method

.method public showOffers()V
    .locals 2

    .prologue
    .line 63
    invoke-static {}, Lcom/tapjoy/TapjoyConnect;->getTapjoyConnectInstance()Lcom/tapjoy/TapjoyConnect;

    move-result-object v0

    invoke-virtual {v0}, Lcom/tapjoy/TapjoyConnect;->showOffers()V

    .line 64
    iget-object v0, p0, Lcom/melesta/payment/tapjoy/TapjoySystem;->handler:Landroid/os/Handler;

    new-instance v1, Lcom/melesta/payment/tapjoy/TapjoySystem$2;

    invoke-direct {v1, p0}, Lcom/melesta/payment/tapjoy/TapjoySystem$2;-><init>(Lcom/melesta/payment/tapjoy/TapjoySystem;)V

    invoke-virtual {v0, v1}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    .line 70
    return-void
.end method
